package com.dxy.yzs.marathon.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dxy.yzs.marathon.common.R;
import com.dxy.yzs.marathon.domain.UserLabelRelation;
import com.dxy.yzs.marathon.service.LabelService;
import com.dxy.yzs.marathon.service.UserLabelRelationService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * class description
 *
 * @author zhangxunwei
 * @date 2021/10/22
 */
@RestController
@AllArgsConstructor
@RequestMapping("/label")
public class LabelController {
    private final UserLabelRelationService userLabelRelationService;

    @GetMapping("/followerCount")
    public R count(Integer labelId) {
        return R.ok().put("data", userLabelRelationService.followerCount(labelId));
    }
}
